package com.middle.common.validate;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;

@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = EnumByteValidate.class)//标明由哪个类执行校验逻辑
public @interface EnumByte {
	
	String message() default "value Is not within the scope of the enumeration";
	
	Class<?>[] groups() default {};
	
	Class<? extends Payload>[] payload() default {};
	byte[] values();

}
